﻿using System;
using System.Collections.ObjectModel;
using System.Data.Linq;
using BleQua.Shared.Interfaces;
using BleQua.Shared.Models;

namespace BleQua.Data {
	public class ContactsManager : Manager<ContactModel> {
		private Shared.DataEntities.ProfileContext DataContext;
		private ProvidersManager providersManager;

		public ContactsManager(Shared.DataEntities.ProfileContext DataContext, ProvidersManager providersManager) {
			// TODO: Complete member initialization
			this.DataContext = DataContext;
			this.providersManager = providersManager;

			if (DataContext != null) {
				this.LoadData( );
			}
		}

		private void LoadData( ) {
			foreach (var item in DataContext.Contacts) {
				this.Add(new ContactModel(item));
			}
		}

		public override void Dispose( ) {
			//throw new NotImplementedException( );
		}
	}
}
